import ProForm, { ProFormTextArea } from '@ant-design/pro-form';
import { useEffect, useState } from 'react';

const AnnotationForm = (props) => {
  const { modalFormRef, cItem } = props;
  const [loading, setLoading] = useState(false);

  useEffect(() => {
    modalFormRef?.current?.setFieldsValue(cItem);
  }, [cItem]);

  return (
    <ProForm
      formRef={modalFormRef}
      style={{ marginTop: 24 }}
      layout="horizontal"
      submitter={false}
    >
      <ProFormTextArea
        name="description"
        label="批注"
        placeholder="请输入批注"
        rules={[{ required: true, message: '请输入批注' }]}
      />
    </ProForm>
  );
};

export default AnnotationForm;
